# Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
# SPDX-License-Identifier: MIT
from langgraph.constants import START
from langgraph.graph import END, StateGraph

from src.html.graph.html_composer_node import html_composer_node
from src.html.graph.state import HtmlState


def build_graph():
    """Build and return the ppt workflow graph."""
    # build state graph
    builder = StateGraph(HtmlState)
    builder.add_node("html_composer", html_composer_node)
    builder.add_edge(START, "html_composer")
    builder.add_edge("html_composer", END)
    return builder.compile()


workflow = build_graph()
